home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC]
/
NeXTSTEP 3.3 Dev Intel.iso
/
usr
/
sybase
/
doc
/
dbsetidle.man
< prev
next >
Wrap
Text File
|
1993-04-22
|
3KB
|
89 lines
1 Version 4.0 -- 5/1/89 dbsetidle
______________________________________________________________________
NAME: dbsetidle
FUNCTION:
Call a user-supplied function when DB-Library is finished reading
from SQL Server.
SYNTAX:
void dbsetidle(dbproc, idlefunc)
DBPROCESS *dbproc;
void (*idlefunc)();
dbsetidle Version 4.0 -- 5/1/89 2
______________________________________________________________________
COMMENTS:
o This routine associates a user-supplied function with the
specified dbproc. The user-supplied function will automati-
cally be called when DB-Library is finished reading or waiting
to read a packet of output from SQL Server. For example, an
application may want to print a message whenever SQL Server has
finished sending data to the host. dbsetidle() will cause the
user-supplied function idlefunc() to be called in this case.
o Similarly, dbsetbusy() may also be used to associate a user-
supplied function, busyfunc(), with a dbproc. busyfunc() will
automatically be called whenever DB-Library is reading or wait-
ing to read a packet of output from SQL Server.
o The server sends result data to the application in packets of
512 bytes. (The final packet in a set of results may be less
than 512 bytes.) DB-Library calls busyfunc() at the beginning
3 Version 4.0 -- 5/1/89 dbsetidle
______________________________________________________________________
of each packet and idlefunc() at the end of each packet. If
the output from the server spans multiple packets, busyfunc()
and idlefunc() will be called multiple times.
o See the dbsetbusy() manual page for an example of installing
and defining busyfunc() and idlefunc().
PARAMETERS:
dbproc - A pointer to the DBPROCESS structure that provides the
connection for a particular front-end/SQL Server process. It
contains all the information that DB-Library uses to manage
communications and data between the front end and SQL Server.
idlefunc - The user-supplied function that will be called by
DB-Library whenever SQL Server has finished sending data to
the host. DB-Library calls idlefunc() with two parameters-
the return value from busyfunc() (a pointer to a function
that returns an integer) and a pointer to the DBPROCESS from
the dbsetidle() call.
dbsetidle Version 4.0 -- 5/1/89 4
______________________________________________________________________
idlefunc() returns void.
RETURNS:
None.
SEE ALSO:
dbsetbusy